package com.yakumosakura.yakumoblade.data;

import cn.mmf.slashblade_addon.data.SlashBladeAddonBuiltInRegistry;
import com.github.L_Ender.cataclysm.init.ModItems;
import com.github.tartaricacid.touhoulittlemaid.init.InitItems;
import com.yakumosakura.yakumoblade.registry.ItemRegistry;
import com.yakumosakura.yakumoblade.registry.slashblade.YAItem;
import mods.flammpfeil.slashblade.data.builtin.SlashBladeBuiltInRegistry;
import mods.flammpfeil.slashblade.init.SBItems;
import mods.flammpfeil.slashblade.recipe.RequestDefinition;
import mods.flammpfeil.slashblade.recipe.SlashBladeIngredient;
import mods.flammpfeil.slashblade.recipe.SlashBladeShapedRecipeBuilder;
import mods.flammpfeil.slashblade.registry.slashblade.EnchantmentDefinition;
import net.minecraft.data.PackOutput;
import net.minecraft.data.recipes.FinishedRecipe;
import net.minecraft.data.recipes.RecipeProvider;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.Items;
import net.minecraftforge.common.Tags;
import net.minecraftforge.common.crafting.conditions.IConditionBuilder;
import net.minecraftforge.registries.ForgeRegistries;
import twilightforest.init.TFItems;

import java.util.function.Consumer;

public class YakumoBladeRecipeProvioder extends RecipeProvider implements IConditionBuilder {
    public YakumoBladeRecipeProvioder(PackOutput output) {
        super(output);
    }
    protected void buildRecipes(Consumer<FinishedRecipe> consumer){

        SlashBladeShapedRecipeBuilder.shaped(YakumoBladeBuiltInRegsitry.DOUBLE_YAMATO.location())
                .pattern("ZVB")
                .pattern("VPV")
                .pattern("BSZ")
                .define('Z', SBItems.proudsoul_sphere)
                .define('V', Tags.Items.STORAGE_BLOCKS_EMERALD)
                .define('S', Items.NETHER_STAR)
                .define('P',Items.SCULK_CATALYST)
                .define('B', SlashBladeIngredient.of(
                        YAItem.getItem(YAItem.SlashBladeOfYakumoBlade),
                        RequestDefinition.Builder.newInstance()
                                .name(YakumoBladeBuiltInRegsitry.GREEN_YAMATO.location())
                                .killCount(10)
                                .refineCount(20)
                                .build()
                )).unlockedBy(getHasName(SBItems.slashblade), has(SBItems.slashblade)).save(consumer);

        SlashBladeShapedRecipeBuilder.shaped(YakumoBladeBuiltInRegsitryHexGram.hexagram_six.location())
                .pattern("WTA")
                .pattern("DXT")
                .pattern("NRB")
                .define('A', Items.AMETHYST_SHARD)
                .define('D', Tags.Items.STORAGE_BLOCKS_DIAMOND)
                .define('R', Tags.Items.STORAGE_BLOCKS_REDSTONE)
                .define('N',Items.NETHER_STAR)
                .define('T', SBItems.proudsoul_sphere)
                .define('B', SlashBladeIngredient.of(
                        RequestDefinition.Builder.newInstance()
                                .name(SlashBladeBuiltInRegistry.RODAI_IRON.location())
                                .killCount(10)
                                .build()
                )
                )
                .define('W', SlashBladeIngredient.of(
                                RequestDefinition.Builder.newInstance()
                                        .name(SlashBladeBuiltInRegistry.RODAI_IRON.location())
                                        .killCount(10)
                                        .build()
                        )
                )
                .define('X', SlashBladeIngredient.of(
                        YAItem.getItem(YAItem.SlashBladeOfYakumoBlade),
                        RequestDefinition.Builder.newInstance()
                                        .name(YakumoBladeBuiltInRegsitryStar.STAR.location())
                                        .killCount(1000)
                                        .refineCount(50)
                                        .build()
                        )
                )
                .unlockedBy(getHasName(SBItems.slashblade), has(SBItems.slashblade)).save(consumer);


        SlashBladeShapedRecipeBuilder.shaped(YakumoBladeBuiltInRegsitry.GREEN_IN.location())
                .pattern("VVZ")
                .pattern("VPV")
                .pattern("BSV")
                .define('Z', SBItems.proudsoul_sphere)
                .define('V', Tags.Items.STORAGE_BLOCKS_EMERALD)
                .define('S', Items.NETHER_STAR)
                .define('P',Items.SCULK_CATALYST)
                .define('B', SlashBladeIngredient.of(
                        YAItem.getItem(YAItem.SlashBladeOfYakumoBlade),
                        RequestDefinition.Builder.newInstance()
                                .name(YakumoBladeBuiltInRegsitry.GREEN_YAMATO.location())
                                .killCount(500)
                                .refineCount(30)
                                .build()
                )).unlockedBy(getHasName(SBItems.slashblade), has(SBItems.slashblade)).save(consumer);

        SlashBladeShapedRecipeBuilder.shaped(YakumoBladeBuiltInRegsitry.GREEN_YAMATO.location())
                .pattern("CZA")
                .pattern("VBV")
                .pattern("AVC")
                .define('Z', Tags.Items.ARMORS_HELMETS)
                .define('V', Tags.Items.STORAGE_BLOCKS_EMERALD)
                .define('C', Items.ENDER_EYE)
                .define('A',Tags.Items.DYES_GREEN)
                .define('B', SBItems.slashblade)
                .unlockedBy(getHasName(SBItems.slashblade), has(SBItems.slashblade)).save(consumer);
        SlashBladeShapedRecipeBuilder.shaped(YakumoBladeBuiltInRegsitry.HUNDRED.location())
                .pattern("VAZ")
                .pattern("DBD")
                .pattern("ZCV")
                .define('Z', SBItems.proudsoul_sphere)
                .define('V', SBItems.proudsoul_trapezohedron)
                .define('D', getItem(ItemRegistry.UMLE.getId()))
                .define('C',SlashBladeIngredient.of(
                        RequestDefinition.Builder.newInstance()
                                .name(SlashBladeBuiltInRegistry.KOSEKI.location())
                                .killCount(1000)
                                .build()
                ))
                .define('B',SlashBladeIngredient.of(
                        RequestDefinition.Builder.newInstance()
                                .name(SlashBladeBuiltInRegistry.SANGE.location())
                                .killCount(1000)
                                .refineCount(20)
                                .build()
                ))
                .define('A',SlashBladeIngredient.of(
                        YAItem.getItem(YAItem.SlashBladeOfYakumoBlade),
                        RequestDefinition.Builder.newInstance()
                                .name(YakumoBladeBuiltInRegsitry.GREEN_YAMATO.location())
                                .killCount(1000)
                                .refineCount(20)
                                .build()
                ))
                .unlockedBy(getHasName(SBItems.slashblade), has(SBItems.slashblade)).save(consumer);

        SlashBladeShapedRecipeBuilder.shaped(YakumoBladeBuiltInRegsitry.RU_SANG.location())
                .pattern("ABC")
                .pattern("DEB")
                .pattern("FDA")
                .define('A', Items.BLAZE_POWDER)
                .define('B',Items.NETHER_QUARTZ_ORE)
                .define('C', ItemRegistry.UMLE.get())
                .define('D', Items.NETHER_BRICK)
                .define('E', Items.BLAZE_ROD)
                .define('F', SlashBladeIngredient.of(
                        RequestDefinition.Builder.newInstance()
                                .name(SlashBladeBuiltInRegistry.TUKUMO.location())
                                .refineCount(20)
                                .build()
                )).unlockedBy(getHasName(SBItems.slashblade), has(SBItems.slashblade)).save(consumer);



        SlashBladeShapedRecipeBuilder.shaped(YakumoBladeBuiltInRegsitryStar.STAR.location())
                .pattern("ZSZ")
                .pattern("ZBZ")
                .pattern("ZZZ")
                .define('Z',SBItems.proudsoul_sphere)
                .define('S', Items.NETHER_STAR)
                .define('B', SBItems.slashblade)
                .unlockedBy(getHasName(SBItems.slashblade), has(SBItems.slashblade)).save(consumer);

        SlashBladeShapedRecipeBuilder.shaped(YakumoBladeBuiltInRegsitryStar.BLACK_SLASH.location())
                .pattern("BTA")
                .pattern("DXT")
                .pattern("NWR")
                .define('A',ItemRegistry.UMLE.get())
                .define('B', SBItems.slashblade)
                .define('D', ItemRegistry.Star_Soul_Crystal.get())
                .define('N', Items.NETHER_STAR)
                .define('R', Tags.Items.STORAGE_BLOCKS_NETHERITE)
                .define('T', SBItems.proudsoul_trapezohedron)
                .define('W', SlashBladeIngredient.of(
                                RequestDefinition.Builder.newInstance()
                                        .name(SlashBladeBuiltInRegistry.KOSEKI.location())
                                        .build()
                        ))
                .define('X', SlashBladeIngredient.of(
                        YAItem.getItem(YAItem.SlashBladeOfYakumoBlade),
                        RequestDefinition.Builder.newInstance()
                                .name(YakumoBladeBuiltInRegsitryStar.STAR.location())
                                .build()
                ))
                .unlockedBy(getHasName(SBItems.slashblade), has(SBItems.slashblade)).save(consumer);

        SlashBladeShapedRecipeBuilder.shaped(YakumoBladeBuiltInRegsitryStar.DINZEER.location())
                .pattern("WTA")
                .pattern("DXT")
                .pattern("NRB")
                .define('A',ItemRegistry.UMLE.get())
                .define('B',  SlashBladeIngredient.of(
                        RequestDefinition.Builder.newInstance()
                                .name(SlashBladeAddonBuiltInRegistry.KIRISAYA.location())
                                .build()
                ))
                .define('D', Tags.Items.STORAGE_BLOCKS_NETHERITE)
                .define('N', Items.NETHER_STAR)
                .define('R', Items.ENDER_EYE)
                .define('T', SBItems.proudsoul_trapezohedron)
                .define('W', SlashBladeIngredient.of(
                        RequestDefinition.Builder.newInstance()
                                .name(SlashBladeAddonBuiltInRegistry.DARK_RAVEN.location())
                                .build()
                ))
                .define('X', SlashBladeIngredient.of(
                        YAItem.getItem(YAItem.SlashBladeOfYakumoBlade),
                        RequestDefinition.Builder.newInstance()
                                .name(YakumoBladeBuiltInRegsitryStar.STAR.location())
                                .killCount(1000)
                                .refineCount(20)
                                .build()
                ))
                .unlockedBy(getHasName(SBItems.slashblade), has(SBItems.slashblade)).save(consumer);
        SlashBladeShapedRecipeBuilder.shaped(YakumoBladeBuiltInRegsitryStar.RED_SUN.location())
                .pattern("VVZ")
                .pattern("VPV")
                .pattern("BSV")
                .define('P', ItemRegistry.Star_Soul_Crystal.get())
                .define('V',Tags.Items.STORAGE_BLOCKS_REDSTONE)
                .define('S', Items.NETHER_STAR)
                .define('B', SlashBladeIngredient.of(
                        YAItem.getItem(YAItem.SlashBladeOfYakumoBlade),
                        RequestDefinition.Builder.newInstance()
                                .name(YakumoBladeBuiltInRegsitryStar.STAR.location())
                                .killCount(1000)
                                .refineCount(20)
                                .build()
                ))
                .define('Z', SlashBladeIngredient.of(
                        YAItem.getItem(YAItem.SlashBladeOfYakumoBlade),
                        RequestDefinition.Builder.newInstance()
                                .name(YakumoBladeBuiltInRegsitry.RU_SANG.location())

                                .build()
                ))
                .unlockedBy(getHasName(SBItems.slashblade), has(SBItems.slashblade)).save(consumer);

        SlashBladeShapedRecipeBuilder.shaped(YakumoBladeBuiltInRegsitry.UNDEAD_SLASH.location())
                .pattern("DSD")
                .pattern("ZBZ")
                .pattern("DZD")
                .define('Z',SBItems.proudsoul_sphere)
                .define('S', Items.NETHER_STAR)
                .define('D', ItemRegistry.UMLE.get())
                .define('B', SlashBladeIngredient.of(
                                RequestDefinition.Builder.newInstance()
                                        .name(SlashBladeBuiltInRegistry.MURAMASA.location())

                                        .build()
                        ))
                .unlockedBy(getHasName(SBItems.slashblade), has(SBItems.slashblade)).save(consumer);

        SlashBladeShapedRecipeBuilder.shaped(YakumoBladeBuiltInRegsitry.VERGIL.location())
                .pattern("ABC")
                .pattern("DEB")
                .pattern("FDA")
                .define('A',ItemRegistry.UMLE.get())
                .define('B', SBItems.proudsoul_trapezohedron)
                .define('C', Items.NETHER_STAR)
                .define('D', Items.NETHERITE_INGOT)
                .define('E', Items.DRAGON_BREATH)
                .define('F', SlashBladeIngredient.of(
                        RequestDefinition.Builder.newInstance()
                                .name(SlashBladeBuiltInRegistry.YAMATO.location())
                                .killCount(1000)
                                .refineCount(200)
                                .proudSoul(1000000)
                                .build()
                ))
                .unlockedBy(getHasName(SBItems.slashblade), has(SBItems.slashblade)).save(consumer);

        SlashBladeShapedRecipeBuilder.shaped(YakumoBladeBuiltInRegsitryStar.YE_SOUL.location())
                .pattern("WZS")
                .pattern("VBX")
                .pattern("DYW")
                .define('W',Tags.Items.GEMS_LAPIS)
                .define('V',SBItems.proudsoul_trapezohedron)
                .define('Y', SBItems.proudsoul_crystal)
                .define('X',SBItems.proudsoul_ingot)
                .define('Z',SBItems.proudsoul_sphere)
                .define('D',ItemRegistry.UMLE.get())
                .define('S',ItemRegistry.Star_Soul_Crystal.get())
                .define('B', SlashBladeIngredient.of(
                        YAItem.getItem(YAItem.SlashBladeOfYakumoBlade),
                        RequestDefinition.Builder.newInstance()
                                .name(YakumoBladeBuiltInRegsitryStar.STAR.location())
                                .killCount(500)
                                .proudSoul(1000)
                                .build()
                ))
                .unlockedBy(getHasName(SBItems.slashblade), has(SBItems.slashblade)).save(consumer);
        SlashBladeShapedRecipeBuilder.shaped(YakumoBladeBuiltInRegsitryTouHou.YAKUMOSAKURA.location())
                .pattern("ABC")
                .pattern("DEB")
                .pattern("FDA")
                .define('A',Items.NETHER_STAR)
                .define('B',SBItems.proudsoul_trapezohedron)
                .define('C', Items.AMETHYST_SHARD)
                .define('D',Items.ENDER_EYE)
                .define('E',Items.END_CRYSTAL)
                .define('F', SlashBladeIngredient.of(
                        YAItem.getItem(YAItem.SlashBladeOfYakumoBlade),
                        RequestDefinition.Builder.newInstance()
                                .name(YakumoBladeBuiltInRegsitryTouHou.nieblade_yukari.location())
                                .killCount(1300)
                                .refineCount(40)
                                .proudSoul(20000)
                                .build()
                ))
                .unlockedBy(getHasName(SBItems.slashblade), has(SBItems.slashblade)).save(consumer);
        SlashBladeShapedRecipeBuilder.shaped(YakumoBladeBuiltInRegsitryTouHou.YUYUKO.location())
                .pattern("SEG")
                .pattern("GDE")
                .pattern("IGS")
                .define('D',TFItems.PEACOCK_FEATHER_FAN.get())
                .define('E', SBItems.proudsoul_sphere)
                .define('G',TFItems.CARMINITE.get())
                .define('S',Items.END_CRYSTAL)
                .define('I', SlashBladeIngredient.of(
                        RequestDefinition.Builder.newInstance()
                                .name(SlashBladeBuiltInRegistry.TAGAYASAN.location())
                                .killCount(1000)
                                .proudSoul(3000)
                                .build()
                ))
                .unlockedBy(getHasName(SBItems.slashblade), has(SBItems.slashblade)).save(consumer);

        SlashBladeShapedRecipeBuilder.shaped(YakumoBladeBuiltInRegsitryTouHou.YUYUKO_3.location())
                .pattern("SEF")
                .pattern("GDE")
                .pattern("IGS")
                .define('D',Items.NETHER_STAR)
                .define('E', Items.END_CRYSTAL)
                .define('G',Items.RESPAWN_ANCHOR)
                .define('S',Items.ECHO_SHARD)
                .define('F',Items.MUSIC_DISC_11)

                .define('I', SlashBladeIngredient.of(
                        YAItem.getItem(YAItem.SlashBladeOfYakumoBlade),
                        RequestDefinition.Builder.newInstance()
                                .name(YakumoBladeBuiltInRegsitryTouHou.YUYUKO_2.location())
                                .killCount(1000)
                                .proudSoul(6000)
                                .build()
                ))
                .unlockedBy(getHasName(SBItems.slashblade), has(SBItems.slashblade)).save(consumer);

        SlashBladeShapedRecipeBuilder.shaped(YakumoBladeBuiltInRegsitryTouHou.YUYUKOFINAL.location())
                .pattern("SEF")
                .pattern("GDE")
                .pattern("IGS")
                .define('D',Items.RECOVERY_COMPASS)
                .define('S', Items.END_CRYSTAL)
                .define('G',Items.TOTEM_OF_UNDYING)
                .define('E',Items.PINK_PETALS)
                .define('F',Items.CHERRY_SAPLING)

                .define('I', SlashBladeIngredient.of(
                        YAItem.getItem(YAItem.SlashBladeOfYakumoBlade),
                        RequestDefinition.Builder.newInstance()
                                .name(YakumoBladeBuiltInRegsitryTouHou.YUYUKO_3.location())
                                .killCount(1000)
                                .proudSoul(10000)
                                .build()
                ))
                .unlockedBy(getHasName(SBItems.slashblade), has(SBItems.slashblade)).save(consumer);

        SlashBladeShapedRecipeBuilder.shaped(YakumoBladeBuiltInRegsitryTouHou.YAKUMOSAKURA2.location())
                .pattern("SCZ")
                .pattern("GDC")
                .pattern("IGS")
                .define('S',Items.NETHER_STAR)
                .define('C', SBItems.proudsoul_trapezohedron)
                .define('Z',Items.AMETHYST_CLUSTER)
                .define('D',Items.END_CRYSTAL)
                .define('G',SBItems.proudsoul_crystal)
                .define('I', SlashBladeIngredient.of(
                        YAItem.getItem(YAItem.SlashBladeOfYakumoBlade),
                        RequestDefinition.Builder.newInstance()
                                .name(YakumoBladeBuiltInRegsitryTouHou.YAKUMOSAKURA.location())
                                .killCount(1000)
                                .proudSoul(10000)
                                .build()
                ))
                    .unlockedBy(getHasName(SBItems.slashblade), has(SBItems.slashblade)).save(consumer);


        SlashBladeShapedRecipeBuilder.shaped(YakumoBladeBuiltInRegsitryTouHou.YUYUKO_2.location())
                .pattern("ABC")
                .pattern("DCB")
                .pattern("EDA")
                .define('A',Items.END_CRYSTAL)
                .define('B',Items.WITHER_ROSE)
                .define('C',SBItems.proudsoul_trapezohedron)
                .define('D',Items.NETHER_STAR)
                .define('E', SlashBladeIngredient.of(
                        YAItem.getItem(YAItem.SlashBladeOfYakumoBlade),
                        RequestDefinition.Builder.newInstance()
                                .name(YakumoBladeBuiltInRegsitryTouHou.YUYUKO.location())
                                .killCount(1000)
                                .proudSoul(10000)
                                .build()
                ))
                .unlockedBy(getHasName(SBItems.slashblade), has(SBItems.slashblade)).save(consumer);



        SlashBladeShapedRecipeBuilder.shaped(YakumoBladeBuiltInRegsitryTouHou.YAKUMOSAKURA3.location())
                .pattern("SEF")
                .pattern("GDE")
                .pattern("IAS")
                .define('D', InitItems.WIRELESS_IO.get())
                .define('E', Items.NETHER_STAR)
                .define('G',Items.MUSIC_DISC_MALL)
                .define('A',Items.PURPLE_BED)
                .define('S',Items.END_CRYSTAL)
                .define('F',Items.SPYGLASS)

                .define('I', SlashBladeIngredient.of(
                        YAItem.getItem(YAItem.SlashBladeOfYakumoBlade),
                        RequestDefinition.Builder.newInstance()
                                .name(YakumoBladeBuiltInRegsitryTouHou.YAKUMOSAKURA2.location())
                                .killCount(1000)
                                .proudSoul(10000)
                                .build()
                ))
                .unlockedBy(getHasName(SBItems.slashblade), has(SBItems.slashblade)).save(consumer);







        SlashBladeShapedRecipeBuilder.shaped(YakumoBladeBuiltInRegsitryTouHou.SP_YAKUMOSAKURA.location())
                .pattern("SED")
                .pattern("GDE")
                .pattern("IGS")
                .define('D', ModItems.VOID_CORE.get())
                .define('E', ModItems.VOID_EYE.get())
                .define('G', ModItems.ABYSS_EYE.get())
                .define('S',Items.END_CRYSTAL)
                .define('I', SlashBladeIngredient.of(
                        YAItem.getItem(YAItem.SlashBladeOfYakumoBlade),
                        RequestDefinition.Builder.newInstance()
                                .name(YakumoBladeBuiltInRegsitryTouHou.YAKUMOSAKURA3.location())
                                .killCount(1000)
                                .refineCount(88)
                                .proudSoul(17000)
                                .build()
                ))
                .unlockedBy(getHasName(SBItems.slashblade), has(SBItems.slashblade)).save(consumer);

        SlashBladeShapedRecipeBuilder.shaped(YakumoBladeBuiltInRegsitryTouHou.SANGE_FLOWER.location())
                .pattern("ABC")
                .pattern("DED")
                .pattern("FLG")
                .define('A', Items.ALLIUM)
                .define('B', Items.HORN_CORAL)//去当海底小纵队吧少年！
                .define('C', Items.BLUE_ORCHID)
                .define('D',SBItems.proudsoul_trapezohedron)//YES
                .define('E', SlashBladeIngredient.of(
                        RequestDefinition.Builder.newInstance()
                                .name(SlashBladeBuiltInRegistry.SANGE.location())
                                .proudSoul(1700)
                                .build()
                ))
                .define('F', Items.SHEARS)
                .define('L', Items.BLAZE_ROD)//去当地狱潜水员吧少年
                .define('G', Items.TRIDENT)//模型和贴图



                .unlockedBy(getHasName(SBItems.slashblade), has(SBItems.slashblade)).save(consumer);

        SlashBladeShapedRecipeBuilder.shaped(YakumoBladeBuiltInRegsitry.mirageedge.location())
                .pattern("ABA")
                .pattern("BCB")
                .pattern("ABA")
                .define('A', SBItems.proudsoul_crystal)
                .define('B', SBItems.proudsoul_trapezohedron)
                .define('C', SlashBladeIngredient.of(
                        SBItems.slashblade,
                        RequestDefinition.Builder.newInstance()
                                .refineCount(100)
                                .killCount(500)
                                .proudSoul(97540)
                                .build()
                ))



                .unlockedBy(getHasName(SBItems.slashblade), has(SBItems.slashblade)).save(consumer);

        SlashBladeShapedRecipeBuilder.shaped(YakumoBladeBuiltInRegsitryStar.hundred_end.location())
                .pattern("ABA")
                .pattern("CDE")
                .pattern("AFA")
                .define('A', SBItems.proudsoul_trapezohedron)
                .define('B',SlashBladeIngredient.of(
                        YAItem.getItem(YAItem.SlashBladeOfYakumoBlade),
                        RequestDefinition.Builder.newInstance()
                                .name(YakumoBladeBuiltInRegsitry.HUNDRED.location())
                                .proudSoul(17000)
                                .killCount(1000)
                                .build()))
                .define('C', ItemRegistry.StarTreasurescripture.get())
                .define('F', SlashBladeIngredient.of(
                        RequestDefinition.Builder.newInstance()
                                .name(SlashBladeBuiltInRegistry.KOSEKI.location())
                                .proudSoul(17000)
                                .killCount(1000)
                                .build()))
                .define('E', ItemRegistry.Star_Soul_Crystal.get())
                .define('D',SlashBladeIngredient.of(
                        YAItem.getItem(YAItem.SlashBladeOfYakumoBlade),
                        RequestDefinition.Builder.newInstance()
                                .name(YakumoBladeBuiltInRegsitryStar.BLACK_SLASH.location())
                                .proudSoul(17000)
                                .killCount(1000)
                                .build()))

                .unlockedBy(getHasName(SBItems.slashblade), has(SBItems.slashblade)).save(consumer);

        SlashBladeShapedRecipeBuilder.shaped(YakumoBladeBuiltInRegsitryStar.BLUE_FOX.location())
                .pattern("CAC")
                .pattern("CBC")
                .pattern("CCC")
                .define('A',SlashBladeIngredient.of(
                        YAItem.getItem(YAItem.SlashBladeOfYakumoBlade),
                        RequestDefinition.Builder.newInstance()
                                .name(YakumoBladeBuiltInRegsitryStar.STAR.location())
                                .proudSoul(1700)
                                .build()))
                .define('B',SlashBladeIngredient.of(
                        RequestDefinition.Builder.newInstance()
                                .name(SlashBladeBuiltInRegistry.FOX_WHITE.location())
                                .proudSoul(1700)
                                .build()))
                .define('C', SBItems.proudsoul_crystal)


                .unlockedBy(getHasName(SBItems.slashblade), has(SBItems.slashblade)).save(consumer);
        SlashBladeShapedRecipeBuilder.shaped(YakumoBladeBuiltInRegsitryStar.STAR_RED.location())
                .pattern(" AB")
                .pattern("ACD")
                .pattern("FE ")
                .define('A',Items.REDSTONE_BLOCK)
                .define('B',Items.IRON_INGOT)
                .define('C',SlashBladeIngredient.of(
                        YAItem.getItem(YAItem.SlashBladeOfYakumoBlade),
                        RequestDefinition.Builder.newInstance()
                                .name(YakumoBladeBuiltInRegsitryStar.STAR.location())
                                .proudSoul(1700)
                                .killCount(100)
                                .build()))
                .define('D', Items.GUNPOWDER)
                .define('F', SBItems.proudsoul_sphere)
                .define('E', SBItems.proudsoul_tiny)

                .unlockedBy(getHasName(SBItems.slashblade), has(SBItems.slashblade)).save(consumer);
        SlashBladeShapedRecipeBuilder.shaped(YakumoBladeBuiltInRegsitryStar.STAR_M.location())
                .pattern(" AB")
                .pattern("ACD")
                .pattern("FE ")
                .define('A',Items.LAPIS_BLOCK)
                .define('B',Items.IRON_INGOT)
                .define('C',SlashBladeIngredient.of(
                        YAItem.getItem(YAItem.SlashBladeOfYakumoBlade),
                        RequestDefinition.Builder.newInstance()
                                .name(YakumoBladeBuiltInRegsitryStar.STAR.location())
                                .proudSoul(1700)
                                .killCount(100)
                                .build()))
                .define('D', Items.GUNPOWDER)
                .define('F', SBItems.proudsoul_sphere)
                .define('E', SBItems.proudsoul_tiny)

                .unlockedBy(getHasName(SBItems.slashblade), has(SBItems.slashblade)).save(consumer);


        SlashBladeShapedRecipeBuilder.shaped(YakumoBladeBuiltInRegsitryHexGram.HEXAGRAM.location())
                .pattern("ABC")
                .pattern("DEF")
                .pattern("GDH")
                .define('A',Items.BLAZE_POWDER)
                .define('B',Items.ENDER_PEARL)
                .define('C',SBItems.proudsoul_trapezohedron)
                .define('D',SlashBladeIngredient.of(
                        RequestDefinition.Builder.newInstance()
                                .name(SlashBladeBuiltInRegistry.RODAI_NETHERITE.location())
                                .killCount(1000)
                                .build()))
                .define('E', SlashBladeIngredient.of(
                        YAItem.getItem(YAItem.SlashBladeOfYakumoBlade),
                        RequestDefinition.Builder.newInstance()
                                .name(YakumoBladeBuiltInRegsitryHexGram.hexagram_six.location())
                                .proudSoul(17000)
                                .killCount(1000)
                                .build()))
                .define('F',Items.ENDER_PEARL)
                .define('G', ItemRegistry.powercore.get())
                .define('H', Items.SEA_LANTERN)
                .unlockedBy(getHasName(SBItems.slashblade), has(SBItems.slashblade)).save(consumer);


        SlashBladeShapedRecipeBuilder.shaped(YakumoBladeBuiltInRegsitryHexGram.foxhexagram.location())
                .pattern("ABC")
                .pattern("DEB")
                .pattern("FDG")
                .define('A',SlashBladeIngredient.of(
                        RequestDefinition.Builder.newInstance()
                                .name(SlashBladeBuiltInRegistry.FOX_WHITE.location())
                                .build()))
                .define('B',Items.SEA_LANTERN)
                .define('C',Items.NETHERITE_BLOCK)
                .define('D',Items.NETHER_STAR)
                .define('E', SlashBladeIngredient.of(
                        YAItem.getItem(YAItem.SlashBladeOfYakumoBlade),
                        RequestDefinition.Builder.newInstance()
                                .name(YakumoBladeBuiltInRegsitryHexGram.HEXAGRAM.location())
                                .proudSoul(17000)
                                .killCount(1000)
                                .build()))
                .define('F', ItemRegistry.powercoreex.get())
                .define('G',SlashBladeIngredient.of(
                        RequestDefinition.Builder.newInstance()
                                .name(SlashBladeBuiltInRegistry.FOX_BLACK.location())
                                .build()))
                .unlockedBy(getHasName(SBItems.slashblade), has(SBItems.slashblade)).save(consumer);





        SlashBladeShapedRecipeBuilder.shaped(YakumoBladeBuiltInRegsitryStar.blackeslashex.location())
                .pattern("ABC")
                .pattern("DEB")
                .pattern("FDA")
                .define('A',Items.CHORUS_FRUIT)
                .define('B',Items.PHANTOM_MEMBRANE)
                .define('C',Items.NETHER_STAR)
                .define('D',Items.AMETHYST_SHARD)
                .define('E',SlashBladeIngredient.of(
                        YAItem.getItem(YAItem.SlashBladeOfYakumoBlade),
                        RequestDefinition.Builder.newInstance()
                                .name(YakumoBladeBuiltInRegsitryStar.BLACK_SLASH.location())
                                .build()))
                .define('F',ItemRegistry.Star_Soul_Crystal.get())
                .unlockedBy(getHasName(SBItems.slashblade), has(SBItems.slashblade)).save(consumer);




        SlashBladeShapedRecipeBuilder.shaped(YakumoBladeBuiltInRegsitryStar.RED_FOX_STAR.location())
                .pattern("ABA")
                .pattern("ECE")
                .pattern("ADA")
                .define('A',SBItems.proudsoul_crystal)
                .define('B',SlashBladeIngredient.of(
                        YAItem.getItem(YAItem.SlashBladeOfYakumoBlade),
                        RequestDefinition.Builder.newInstance()
                                .name(YakumoBladeBuiltInRegsitryStar.STAR.location())
                                .killCount(1000)
                                .build()))
                .define('C',SlashBladeIngredient.of(
                        RequestDefinition.Builder.newInstance()
                                .name(SlashBladeBuiltInRegistry.FOX_BLACK.location())
                                .killCount(1000)
                                .build()))
                .define('D',ItemRegistry.Star_Soul_Crystal.get())
                .define('E',Items.REDSTONE_BLOCK)

                .unlockedBy(getHasName(SBItems.slashblade), has(SBItems.slashblade)).save(consumer);

        SlashBladeShapedRecipeBuilder.shaped(YakumoBladeBuiltInRegsitryStar.RED_FOX_STAR_SOUL.location())
                .pattern("ABA")
                .pattern("CDE")
                .pattern("AFA")
                .define('A', SBItems.proudsoul_trapezohedron)
                .define('B',SlashBladeIngredient.of(
                        YAItem.getItem(YAItem.SlashBladeOfYakumoBlade),
                        RequestDefinition.Builder.newInstance()
                                .name(YakumoBladeBuiltInRegsitryStar.RED_SUN.location())
                                .proudSoul(17000)
                                .killCount(1000)
                                .build()))
                .define('C', ItemRegistry.StarTreasurescripture.get())
                .define('D', SlashBladeIngredient.of(
                        RequestDefinition.Builder.newInstance()
                                .name(SlashBladeBuiltInRegistry.FOX_BLACK.location())
                                .proudSoul(17000)
                                .killCount(1000)
                                .build()))
                .define('E', ItemRegistry.Star_Soul_Crystal.get())
                .define('F',SlashBladeIngredient.of(
                        YAItem.getItem(YAItem.SlashBladeOfYakumoBlade),
                        RequestDefinition.Builder.newInstance()
                                .name(YakumoBladeBuiltInRegsitryStar.RED_FOX_STAR.location())
                                .proudSoul(17000)
                                .killCount(1000)
                                .build()))

                .unlockedBy(getHasName(SBItems.slashblade), has(SBItems.slashblade)).save(consumer);





        SlashBladeShapedRecipeBuilder.shaped(YakumoBladeBuiltInRegsitryStar.sky_ruine.location())
                .pattern("ABA")
                .pattern("CDC")
                .pattern("EFE")
                .define('A',ItemRegistry.Star_Soul_Crystal.get())
                .define('B',Items.NETHER_STAR)
                .define('C',Items.FEATHER)
                .define('D',SlashBladeIngredient.of(
                        YAItem.getItem(YAItem.SlashBladeOfYakumoBlade),
                        RequestDefinition.Builder.newInstance()
                                .name(YakumoBladeBuiltInRegsitryStar.STAR.location())
                                .build()))
                .define('E',Items.LIGHTNING_ROD)
                .define('F',Items.ELYTRA)
                .unlockedBy(getHasName(SBItems.slashblade), has(SBItems.slashblade)).save(consumer);

        SlashBladeShapedRecipeBuilder.shaped(YakumoBladeBuiltInRegsitryStar.GREEN_INex.location())
                .pattern("ABA")
                .pattern("CDC")
                .pattern("EFE")
                .define('A',ItemRegistry.Star_Soul_Crystal.get())
                .define('B',Items.TURTLE_HELMET)
                .define('C',Items.ENDER_EYE)
                .define('D',SlashBladeIngredient.of(
                        YAItem.getItem(YAItem.SlashBladeOfYakumoBlade),
                        RequestDefinition.Builder.newInstance()
                                .name(YakumoBladeBuiltInRegsitry.GREEN_IN.location())
                                .build()))
                .define('E',Tags.Items.STORAGE_BLOCKS_EMERALD)
                .define('F',ItemRegistry.StarTreasurescripture.get())
                .unlockedBy(getHasName(SBItems.slashblade), has(SBItems.slashblade)).save(consumer);


        SlashBladeShapedRecipeBuilder.shaped(YakumoBladeBuiltInRegsitryStar.sun_rise.location())
                .pattern("ABA")
                .pattern("CDE")
                .pattern("AFA")
                .define('A',SBItems.proudsoul_trapezohedron)
                .define('B',SlashBladeIngredient.of(
                        YAItem.getItem(YAItem.SlashBladeOfYakumoBlade),
                        RequestDefinition.Builder.newInstance()
                                .name(YakumoBladeBuiltInRegsitryStar.RED_SUN.location())
                                .build()))
                .define('C',ItemRegistry.StarTreasurescripture.get())
                .define('D',SlashBladeIngredient.of(
                        RequestDefinition.Builder.newInstance()
                                .name(SlashBladeBuiltInRegistry.TUKUMO.location())
                                .build()))
                .define('E',ItemRegistry.Star_Soul_Crystal.get())
                .define('F',SlashBladeIngredient.of(
                        YAItem.getItem(YAItem.SlashBladeOfYakumoBlade),
                        RequestDefinition.Builder.newInstance()
                                .name(YakumoBladeBuiltInRegsitryStar.RED_SUN.location())
                                .build()))
                .unlockedBy(getHasName(SBItems.slashblade), has(SBItems.slashblade)).save(consumer);

        SlashBladeShapedRecipeBuilder.shaped(YakumoBladeBuiltInRegsitryStar.BLUE_FOX_STAR_SOUL.location())
                .pattern("ABC")
                .pattern("DEF")
                .pattern("GHA")
                .define('A',SBItems.proudsoul_trapezohedron)
                .define('B',ItemRegistry.Star_Soul_Crystal.get())
                .define('C',ItemRegistry.StarTreasurescripture.get())
                .define('D',Items.LAPIS_BLOCK)
                .define('E',SlashBladeIngredient.of(
                        YAItem.getItem(YAItem.SlashBladeOfYakumoBlade),
                        RequestDefinition.Builder.newInstance()
                                .name(YakumoBladeBuiltInRegsitryStar.BLUE_FOX.location())
                                .build()))
                .define('F',ItemRegistry.Star_Soul_Crystal.get())
                .define('G',SlashBladeIngredient.of(
                        RequestDefinition.Builder.newInstance()
                                .name(SlashBladeBuiltInRegistry.FOX_BLACK.location())
                                .build()))
                .define('H',Items.ICE)
                .unlockedBy(getHasName(SBItems.slashblade), has(SBItems.slashblade)).save(consumer);
        SlashBladeShapedRecipeBuilder.shaped(YakumoBladeBuiltInRegsitryStar.PURPLE_FOX_STAR_SOUL.location())
                .pattern("ABC")
                .pattern("DEF")
                .pattern("CGH")
                .define('A',Items.ICE)
                .define('B',Items.BEACON)
                .define('C',Items.CRYING_OBSIDIAN)
                .define('D',SlashBladeIngredient.of(
                        YAItem.getItem(YAItem.SlashBladeOfYakumoBlade),
                        RequestDefinition.Builder.newInstance()
                                .name(YakumoBladeBuiltInRegsitryStar.BLUE_FOX_STAR_SOUL.location())
                                .build()))
                .define('E',SlashBladeIngredient.of(
                        YAItem.getItem(YAItem.SlashBladeOfYakumoBlade),
                        RequestDefinition.Builder.newInstance()
                                .name(YakumoBladeBuiltInRegsitryStar.STAR.location())
                                .build()))
                .define('F',SlashBladeIngredient.of(
                        YAItem.getItem(YAItem.SlashBladeOfYakumoBlade),
                        RequestDefinition.Builder.newInstance()
                                .name(YakumoBladeBuiltInRegsitryStar.RED_FOX_STAR_SOUL.location())
                                .build()))
                .define('G',ItemRegistry.StarTreasurescripture.get())
                .define('H',Items.MAGMA_BLOCK)
                .unlockedBy(getHasName(SBItems.slashblade), has(SBItems.slashblade)).save(consumer);

        SlashBladeShapedRecipeBuilder.shaped(YakumoBladeBuiltInRegsitryStar.starstr.location())
                .pattern("ABA")
                .pattern("CDE")
                .pattern("AFA")
                .define('A',ItemRegistry.Star_Soul_Crystal.get())
                .define('B',ItemRegistry.StarTreasurescripture.get())
                .define('C',SlashBladeIngredient.of(
                        YAItem.getItem(YAItem.SlashBladeOfYakumoBlade),
                        RequestDefinition.Builder.newInstance()
                                .name(YakumoBladeBuiltInRegsitryStar.GREEN_INex.location())
                                .build()))
                .define('D',SlashBladeIngredient.of(
                        YAItem.getItem(YAItem.SlashBladeOfYakumoBlade),
                        RequestDefinition.Builder.newInstance()
                                .name(YakumoBladeBuiltInRegsitryStar.YE_SOUL.location())
                                .build()
                ))
                .define('E',SlashBladeIngredient.of(
                        YAItem.getItem(YAItem.SlashBladeOfYakumoBlade),
                        RequestDefinition.Builder.newInstance()
                                .name(YakumoBladeBuiltInRegsitryStar.sun_rise.location())
                                .build()
                ))
                .define('F',ItemRegistry.UMLE.get())
                .unlockedBy(getHasName(SBItems.slashblade), has(SBItems.slashblade)).save(consumer);

        SlashBladeShapedRecipeBuilder.shaped(YakumoBladeBuiltInRegsitryStar.FINAL_STAR_SOUL.location())
                .pattern("ABA")
                .pattern("CDE")
                .pattern("AFA")
                .define('A',ItemRegistry.UMLE.get())
                .define('B',Items.DRAGON_EGG)
                .define('C',SlashBladeIngredient.of(
                        YAItem.getItem(YAItem.SlashBladeOfYakumoBlade),
                        RequestDefinition.Builder.newInstance()
                                .name(YakumoBladeBuiltInRegsitryStar.blackeslashex.location())
                                .build()))
                .define('D',SlashBladeIngredient.of(
                        YAItem.getItem(YAItem.SlashBladeOfYakumoBlade),
                        RequestDefinition.Builder.newInstance()
                                .name(YakumoBladeBuiltInRegsitryStar.sky_ruine.location())
                                .build()
                ))
                .define('E',SlashBladeIngredient.of(
                        YAItem.getItem(YAItem.SlashBladeOfYakumoBlade),
                        RequestDefinition.Builder.newInstance()
                                .name(YakumoBladeBuiltInRegsitryStar.hundred_end.location())
                                .build()
                ))
                .define('F',Items.NETHER_STAR)
                .unlockedBy(getHasName(SBItems.slashblade), has(SBItems.slashblade)).save(consumer);

        SlashBladeShapedRecipeBuilder.shaped(YakumoBladeBuiltInRegsitryTouHou.blademaster_yukari.location())
                .pattern(" AB")
                .pattern("CDE")
                .pattern("FA ")
                .define('A',SBItems.proudsoul_ingot)
                .define('B',Items.ENDER_EYE)
                .define('C',Items.RED_DYE)
                .define('D',SlashBladeIngredient.of(
                        RequestDefinition.Builder.newInstance()
                                .refineCount(10)
                                .killCount(10)
                                .proudSoul(1000)
                                .build()
                ))
                .define('E',Items.PURPLE_DYE)
                .define('F',Items.DIAMOND)
                .unlockedBy(getHasName(SBItems.slashblade), has(SBItems.slashblade)).save(consumer);
        SlashBladeShapedRecipeBuilder.shaped(YakumoBladeBuiltInRegsitryTouHou.nieblade_yukari.location())
                .pattern(" AB")
                .pattern("CDE")
                .pattern("FG ")
                .define('A',Items.ENDER_PEARL)
                .define('B',Items.RED_DYE)
                .define('C',Items.BLAZE_POWDER)
                .define('D',SlashBladeIngredient.of(
                        YAItem.getItem(YAItem.SlashBladeOfYakumoBlade),
                        RequestDefinition.Builder.newInstance()
                                .name(YakumoBladeBuiltInRegsitryTouHou.blademaster_yukari.location())
                                .refineCount(50)
                                .killCount(150)
                                .proudSoul(1000)
                                .build()
                ))
                .define('E',Items.ENDER_EYE)
                .define('F',Items.IRON_INGOT)
                .define('G',Items.BLACK_DYE)
                .unlockedBy(getHasName(SBItems.slashblade), has(SBItems.slashblade)).save(consumer);

        SlashBladeShapedRecipeBuilder.shaped(YakumoBladeBuiltInRegsitryTouHou.yukari_blade.location())
                .pattern("ABC")
                .pattern("DEB")
                .pattern("FDA")
                .define('A',Items.PINK_PETALS)
                .define('B',Items.CHERRY_SAPLING)
                .define('C',Items.CHERRY_LOG)

                .define('D',SBItems.proudsoul_trapezohedron)

                .define('E',Items.CHERRY_LOG)

                .define('F',SlashBladeIngredient.of(
                        SBItems.slashblade_wood,
                        RequestDefinition.Builder.newInstance()
                                .refineCount(50)
                                .killCount(100)
                                .proudSoul(2000)
                                .build()
                ))

                .unlockedBy(getHasName(SBItems.slashblade), has(SBItems.slashblade)).save(consumer);

        SlashBladeShapedRecipeBuilder.shaped(YakumoBladeBuiltInRegsitryHexGram.FIRE_DRAGON.location())
                .pattern(" EF")
                .pattern("BCS")
                .pattern("WQ ")
                .define('W', Tags.Items.CROPS_WHEAT)
                .define('Q', Items.ICE)
                .define('B', Items.BLAZE_POWDER)
                .define('S', SBItems.proudsoul_crystal)
                .define('E', Items.MAGMA_BLOCK)
                .define('F', Tags.Items.FEATHERS)
                .define('C',
                        SlashBladeIngredient.of(
                                RequestDefinition.Builder.newInstance().name(SlashBladeBuiltInRegistry.RUBY.location())
                                        .build()))

                .unlockedBy(getHasName(SBItems.slashblade_silverbamboo), has(SBItems.slashblade_silverbamboo))
                .save(consumer);

        SlashBladeShapedRecipeBuilder.shaped(YakumoBladeBuiltInRegsitryHexGram.ICE_DRAGON.location())
                .pattern(" EF")
                .pattern("BCS")
                .pattern("WQ ")
                .define('W', Tags.Items.CROPS_WHEAT)
                .define('Q', Items.MAGMA_BLOCK)
                .define('B', Items.BLAZE_POWDER)
                .define('S', SBItems.proudsoul_crystal)
                .define('E', Items.ICE)
                .define('F', Tags.Items.FEATHERS)
                .define('C',
                        SlashBladeIngredient.of(
                                RequestDefinition.Builder.newInstance().name(SlashBladeBuiltInRegistry.RUBY.location())
                                        .build()))

                .unlockedBy(getHasName(SBItems.slashblade_silverbamboo), has(SBItems.slashblade_silverbamboo))
                .save(consumer);

        SlashBladeShapedRecipeBuilder.shaped(YakumoBladeBuiltInRegsitryHexGram.dragonhexagram.location())
                .pattern("ABC")
                .pattern("DEB")
                .pattern("FDG")
                .define('A',SlashBladeIngredient.of(
                        YAItem.getItem(YAItem.SlashBladeOfYakumoBlade),
                        RequestDefinition.Builder.newInstance()
                                .name(YakumoBladeBuiltInRegsitryHexGram.ICE_DRAGON.location())
                                .build()))
                .define('B',Items.SEA_LANTERN)
                .define('C',Items.NETHERITE_BLOCK)
                .define('D',Items.NETHER_STAR)
                .define('E', SlashBladeIngredient.of(
                        YAItem.getItem(YAItem.SlashBladeOfYakumoBlade),
                        RequestDefinition.Builder.newInstance()
                                .name(YakumoBladeBuiltInRegsitryHexGram.HEXAGRAM.location())
                                .proudSoul(17000)
                                .killCount(1000)
                                .build()))
                .define('F', ItemRegistry.powercoreex.get())
                .define('G',SlashBladeIngredient.of(
                        YAItem.getItem(YAItem.SlashBladeOfYakumoBlade),
                        RequestDefinition.Builder.newInstance()
                                .name(YakumoBladeBuiltInRegsitryHexGram.FIRE_DRAGON.location())
                                .build()))
                .unlockedBy(getHasName(SBItems.slashblade), has(SBItems.slashblade)).save(consumer);


    }
    public Item getItem(ResourceLocation item) {
        return ForgeRegistries.ITEMS.getValue(item);
    }
}

